package com.sheye.Test;

import com.sheye.User.User;
import com.sheye.UserDaoImpl.UserDaoImpl;

import java.sql.SQLException;
import java.util.Scanner;

/** 功能类
 * @author Sheye
 * @date 2019-04-19 19:03
 */
public class Tset {
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        //创建输入
        Scanner scn = new Scanner(System.in);
        System.out.println("请输入账号");
        String uname = scn.next();
        System.out.println("请输入密码");
        int pwd =scn.nextInt();
        //执行业务层
        UserDaoImpl ud = new UserDaoImpl();
        User u = ud.getUserInfo(uname,pwd);
        //对业务层的返回值做出判断
        if (u==null){
            System.out.println("您输入的密码错误");
        }else {
            System.out.println("登陆成功");
        }


    }
}
